<?php
if ( $is_print ) {
	header('Content-type: application/vnd.ms-excel');
	header('Content-Disposition: attachment; filename=sales_order_export.xls');
}
?>
<table border=1 style="font-family: Calibri; font-size: 14px; margin: 10px;">
<!-- Headers -->
<thead>
<tr style="background: black; color: white;">
      <th>{{ $list_so_id }}</a></td>
      <th>{{ $list_order_date }}</a></td>
      <th>{{ $list_so_email }}</a></td>
       <th>{{ $list_so_ship_addressee }}</a></td>
      <th>{{ $list_so_ship_line1 }}</a></td>
      <th>{{ $list_so_ship_line2 }}</a></td>
      <th>{{ $list_so_ship_province }}</a></td>
	  <th>{{ $list_so_ship_country }}</a></td>
	  <th>{{ $list_so_ship_postal }}</a></td>
	  <th>{{ $list_so_ship_phone }}</a></td>
	  <th>{{ $list_so_item_id }}</a></td>
	  <th>{{ $list_so_item_qty }}</a></td>
	  <th>{{ $list_so_gross_total }}</a></td>
	  <th>{{ $list_so_payment_type }}</a></td>
	  <th>{{ $list_so_shipping_type }}</a></td>
    </tr>
  </thead> 
  
	@foreach($so_list as $key=>$value)
	<tr>
		<td>{{ $value->id }}</td>
		<td>{{ date_format($value->created_at,"m/d/Y") }}</td> 
		<td>{{ $value->email }}</td>
		<td>{{ $value->firstname }}{{ $value->lastname }}</td>
		<td>{{ $value->unit }} {{ $value->street }}</td>
		<td>{{ $value->barangay }}</td>
		<td>{{ $value->city }}</td>
		<td>Philippines</td>
		<td>{{ $value->zip_code }}</td>
		<td>{{ $value->mobile }}</td>
		<td>{{ $value->code }}</td>
		<td>{{ $value->quantity }}</td>
		<td>{{ number_format($value->benstore_price * $value->quantity,2) }}</td>
		<td>{{ $value->payment_method }}</td>
		<td>Standard Delivery</td>
	</tr>
	@endforeach
</table>